﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/Directora.Master" AutoEventWireup="true" CodeBehind="CrearActividad.aspx.cs" Inherits="Interfaces.CronogramaDeActividades.CrearActividad" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style2
        {
            width: 208px;
        }
        .style7
        {
            width: 278px;
            height: 33px;
        }
        .style8
        {
            width: 646px;
            height: 33px;
            text-align: left;
        }
        .style9
        {
            height: 33px;
        }
    .style11
    {
        width: 646px;
        text-align: left;
    }
        .style12
        {
            width: 278px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <script>
    function Count(text) {
        //asp.net textarea maxlength doesnt work; do it by hand
        var maxlength = 200; //set your value here (or add a parm and pass it in)
        var object = document.getElementById(text.id)  //get your object
        if (object.value.length > maxlength) {
            object.focus(); //set focus to prevent jumping
            object.value = text.value.substring(0, maxlength); //truncate the value
            object.scrollTop = object.scrollHeight; //scroll to the end to prevent jumping
            return false;
        }
        return true;
    }
</script>
    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
    </asp:ScriptManagerProxy>
    <asp:MultiView ID="MultiView1" runat="server">
        <asp:View ID="View1" runat="server">
            <asp:Panel ID="Panel1" runat="server" GroupingText="Crear Actividad" 
                Height="364px" style="text-align: left">
                <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                    <ContentTemplate>
                        <table class="style1">
                            <tr>
                                <td class="style12">
                                    &nbsp;</td>
                                <td class="style11">
                                    &nbsp;</td>
                                <td>
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td class="style12">
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Nombre de la Actividad:&nbsp;</td>
                                <td class="style11">
                                    <asp:TextBox ID="TextBox1" runat="server" Height="24px" MaxLength="50" 
                                        Width="321px"></asp:TextBox>
                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                                        ControlToValidate="TextBox1" 
                                        ErrorMessage="*No se permiten caracteres especiales" ForeColor="Red" 
                                        ValidationExpression="^[0-9a-zA-Z\s]+$"></asp:RegularExpressionValidator>
                                </td>
                                <td>
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td class="style7">
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Fecha De la Actividad:&nbsp;</td>
                                <td class="style8">
                                    <asp:TextBox ID="TextBox4" runat="server" Enabled="False"></asp:TextBox>
                                    <ajaxToolkit:CalendarExtender ID="TextBox4_CalendarExtender" runat="server" 
                                        Format="yyyy-MM-dd" PopupButtonID="ImageButton1" TargetControlID="TextBox4">
                                    </ajaxToolkit:CalendarExtender>
                                    <asp:ImageButton ID="ImageButton1" runat="server" 
                                        ImageUrl="~/Images/calendar.jpg" />
                                </td>
                                <td class="style9">
                                </td>
                            </tr>
                            <tr>
                                <td class="style12">
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Descripcion:&nbsp;</td>
                                <td class="style11">
                                    <asp:TextBox ID="textbox3" runat="server"  Rows="3" Height="134px"
                                        TextMode="MultiLine" Width="398px"  onKeyUp="javascript:Count(this);" onChange="javascript:Count(this);"></asp:TextBox>
                                </td>
                                <td>
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td class="style12">
                                    &nbsp;</td>
                                <td class="style11">
                                    <asp:Label ID="Label2" runat="server" ForeColor="Red"></asp:Label>
                                    <br />
                                    <br />
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    <asp:Button ID="Button1" runat="server" Height="24px" onclick="Button1_Click"                                          
                                        Text="Añadir" Width="94px" CssClass=JCIstyle />
                                    &nbsp;&nbsp;&nbsp;
                                    <ajaxToolkit:ConfirmButtonExtender ID="Button1_ConfirmButtonExtender" 
                                        runat="server" ConfirmText="Esta segura de crear esta actividad" Enabled="True" TargetControlID="Button1">
                                    </ajaxToolkit:ConfirmButtonExtender>
                                    <asp:Button ID="Button2" runat="server" Height="23px" onclick="Button2_Click" 
                                        Text="Cancelar" Width="96px" CssClass=JCIstyle />
                                </td>
                                <td>
                                    &nbsp;</td>
                            </tr>
                        </table>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </asp:Panel>
        </asp:View>
        <asp:View ID="View2" runat="server">
            <asp:Panel ID="Panel2" runat="server" style="font-size: large; color: #0033CC">

                Error<br />
                <asp:Label ID="Label4" runat="server" 
                    Text="El Ci es nulo o no esta registrado como miembro "></asp:Label>

            </asp:Panel>
        </asp:View>
    </asp:MultiView>
</asp:Content>
